<?php

//$a = $_POST["a"];
$a= $_GET["a"];
echo $a;
echo "<br/>";

//$b = $_POST["b"];
$b = $_GET["b"];
echo $b;
echo "<br/>";

$c = $_GET["c"];
echo $c;
echo "<br/>";

echo "你好";

$ip="mysql:host=127.0.0.1;";
$name="root";
$pwd="root";
$conn=new PDO($ip,$name,$pwd);

$conn->exec("set charset utf8;");

$conn->exec("use hoho;");

// $sql="insert into student(id,name,sex) values('$a','$b','$c')";
// $sqle=$conn->prepare($sql);
// $sqle->execute();




$sql="select * from student;";
$sqle= $conn->prepare($sql);
$ok=$sqle->execute();
//var_dump($sqle->fetch());
 
echo json_encode($sqle->fetchAll());

header("Content-Type: text/html; charset=utf-8");